

%% specify files

matfiles = {'run1a_baseline_sr.mat','run1b_baseline_no_sr.mat',...
    'run5a_crra_sr.mat','run7a_Nstate_sr_fit_v3.mat','run6a_time_varying_s_sr.mat'};

for i = 1:5
    load(matfiles{i})
    stats_list{i} = stats;
end

%% decomposition of average bond risk prem across models

cons_terms = zeros(1,numel(matfiles));
zeta_terms = zeros(1,numel(matfiles));
cross_terms = zeros(1,numel(matfiles));
sum_terms = zeros(1,numel(matfiles));

for i = 1:numel(matfiles)
    load(matfiles{i})
    cons_terms(i) = 100*mean(stats.bond_risk_prem_real_decomp_uncond.cons_term);
    zeta_terms(i) = 100*mean(stats.bond_risk_prem_real_decomp_uncond.zeta_term);
    cross_terms(i) = 100*mean(stats.bond_risk_prem_real_decomp_uncond.cross_term);
    sum_terms(i) = 100*mean(stats.bond_risk_prem_real_uncond);
    CHECK = sum_terms(i) - (cons_terms(i) + zeta_terms(i) + cross_terms(i))
end

fprintf('\n\ncons terms: ')
fprintf('%2.3f &', cons_terms)
fprintf('\nzeta terms: ')
fprintf('%2.3f &', zeta_terms)
fprintf('\ncross terms: ')
fprintf('%2.3f &', cross_terms)
fprintf('\nsum terms: ')
fprintf('%2.3f &', sum_terms)